<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <title>个人中心 - 易渔</title>
    <link href="https://cdnjs.cloudflare.com/ajax/libs/tailwindcss/2.2.19/tailwind.min.css" rel="stylesheet">
    <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css" rel="stylesheet">
    <link href="css/style.css" rel="stylesheet">
    <link rel="icon" href="assets/logo/logo.png">
</head>

<body class="bg-gray-100 min-h-screen">
    <div id="particles-js" class="fixed inset-0 z-0"></div>

    <!-- 导航栏 -->
    <nav class="bg-gradient-to-r from-blue-700 to-blue-500 text-white shadow-lg relative z-10">
        <div class="container mx-auto px-4 py-3">
            <div class="flex flex-wrap justify-between items-center">
                <div class="flex items-center">
                    <img src="assets/logo/logo.png" alt="易渔" style="width: 30px;height: 40px;">
                    <a href="index.html" class="text-2xl font-bold">易渔</a>
                </div>
                <div class="hidden md:flex space-x-8 text-lg">
                    <a href="index.html" class="hover:text-blue-200 transition duration-300">首页</a>
                    <a href="forum.html" class="hover:text-blue-200 transition duration-300">论坛</a>
                    <a href="mall.html" class="hover:text-blue-200 transition duration-300">商城</a>
                    <a href="#" class="hover:text-blue-200 transition duration-300" id="communityBtn">社区活动</a>
                    <a href="#" class="hover:text-blue-200 transition duration-300" id="techniqueBtn">钓技研究</a>
                </div>
                <div class="flex items-center">
                    <a href="cart.html" class="mr-4 relative">
                        <i class="fas fa-shopping-cart text-xl"></i>
                        <span id="cart-count"
                            class="absolute -top-2 -right-2 bg-red-500 text-white rounded-full h-5 w-5 flex items-center justify-center text-xs">0</span>
                    </a>
                    <div id="user-auth-section">
                        <a href="auth.html"
                            class="bg-white text-blue-600 hover:bg-blue-100 px-4 py-2 rounded-lg font-medium transition duration-300">登录/注册</a>
                    </div>
                    <div id="user-info-section" class="hidden">
                        <div class="flex items-center">
                            <img id="user-avatar" src="https://picsum.photos/40/40" alt="用户头像"
                                class="w-8 h-8 rounded-full mr-2 cursor-pointer" id="profile-avatar">
                            <span id="username" class="font-medium"></span>
                            <button id="logout-btn" class="ml-3 text-sm text-blue-200 hover:text-white">退出</button>
                        </div>
                    </div>
                    <button id="mobile-menu-btn" class="md:hidden ml-4">
                        <i class="fas fa-bars text-2xl"></i>
                    </button>
                </div>
            </div>
            <!-- 移动端菜单 -->
            <div id="mobile-menu" class="hidden md:hidden w-full mt-3">
                <a href="index.html" class="block py-2 hover:bg-blue-600 px-2 rounded">首页</a>
                <a href="forum.html" class="block py-2 hover:bg-blue-600 px-2 rounded">论坛</a>
                <a href="mall.html" class="block py-2 hover:bg-blue-600 px-2 rounded">商城</a>
                <a href="#" class="block py-2 hover:bg-blue-600 px-2 rounded">社区活动</a>
                <a href="#" class="block py-2 hover:bg-blue-600 px-2 rounded">钓技研究</a>
            </div>
        </div>
    </nav>

    <!-- 个人中心内容区域 -->
    <div class="container mx-auto px-4 py-8 relative z-10">
        <div class="flex flex-col md:flex-row gap-8">
            <!-- 左侧个人信息栏 -->
            <div class="w-full md:w-1/3">
                <div class="bg-white rounded-lg shadow-md p-6 sticky top-4">
                    <div class="flex flex-col items-center mb-6">
                        <img id="profile-avatar-large" src="https://picsum.photos/150/150" alt="用户头像"
                            class="w-24 h-24 rounded-full mb-4 border-4 border-blue-100">
                        <h2 id="profile-username" class="text-xl font-bold">用户名</h2>
                        <p id="profile-email" class="text-gray-500 text-sm">user@example.com</p>
                    </div>

                    <div class="border-t border-gray-200 pt-4 mb-4">
                        <div class="flex justify-between items-center mb-2">
                            <span class="text-gray-600">注册时间</span>
                            <span id="profile-register-date" class="font-medium">2025-01-01</span>
                        </div>
                        <div class="flex justify-between items-center mb-2">
                            <span class="text-gray-600">钓鱼经验</span>
                            <span class="font-medium">3年</span>
                        </div>
                        <div class="flex justify-between items-center">
                            <span class="text-gray-600">积分</span>
                            <span class="font-medium text-blue-600">1280</span>
                        </div>
                    </div>

                    <div class="border-t border-gray-200 pt-4">
                        <h3 class="font-bold mb-3">个人简介</h3>
                        <p id="profile-bio" class="text-gray-600">这里是用户的个人简介，可以介绍自己的钓鱼经历和喜好...</p>
                        <button id="edit-profile-btn"
                            class="mt-4 w-full bg-blue-600 hover:bg-blue-700 text-white py-2 rounded-lg transition duration-300">
                            <i class="fas fa-edit mr-2"></i>编辑资料
                        </button>
                    </div>
                </div>
            </div>

            <!-- 右侧内容区域 -->
            <div class="w-full md:w-2/3">
                <!-- 浏览历史 -->
                <div class="bg-white rounded-lg shadow-md p-6 mb-8">
                    <div class="flex justify-between items-center mb-6">
                        <h2 class="text-xl font-bold flex items-center">
                            <i class="fas fa-history text-blue-500 mr-2"></i>
                            最近浏览
                        </h2>
                        <a href="#" class="text-sm text-blue-600 hover:text-blue-800">查看更多</a>
                    </div>

                    <div id="history-items" class="grid grid-cols-1 sm:grid-cols-2 gap-4">
                        <!-- 浏览历史项目将由JavaScript动态生成 -->
                        <div class="text-center py-8 text-gray-400">
                            <i class="fas fa-eye-slash text-3xl mb-2"></i>
                            <p>暂无浏览记录</p>
                        </div>
                    </div>
                </div>

                <!-- 我的帖子 -->
                <div class="bg-white rounded-lg shadow-md p-6 mb-8">
                    <div class="flex justify-between items-center mb-6">
                        <h2 class="text-xl font-bold flex items-center">
                            <i class="fas fa-comments text-blue-500 mr-2"></i>
                            我的帖子
                        </h2>
                        <a href="forum.html" class="text-sm text-blue-600 hover:text-blue-800">查看全部</a>
                    </div>

                    <div id="my-posts" class="divide-y divide-gray-200">
                        <!-- 帖子将由JavaScript动态生成 -->
                        <div class="text-center py-8 text-gray-400">
                            <i class="fas fa-comment-dots text-3xl mb-2"></i>
                            <p>暂无发布的帖子</p>
                        </div>
                    </div>
                </div>

                <!-- 我的收藏 -->
                <div class="bg-white rounded-lg shadow-md p-6">
                    <div class="flex justify-between items-center mb-6">
                        <h2 class="text-xl font-bold flex items-center">
                            <i class="fas fa-star text-blue-500 mr-2"></i>
                            我的收藏
                        </h2>
                        <a href="#" class="text-sm text-blue-600 hover:text-blue-800">查看全部</a>
                    </div>

                    <div id="my-favorites" class="grid grid-cols-1 sm:grid-cols-2 gap-4">
                        <!-- 收藏项目将由JavaScript动态生成 -->
                        <div class="text-center py-8 text-gray-400">
                            <i class="far fa-star text-3xl mb-2"></i>
                            <p>暂无收藏内容</p>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <!-- 编辑资料模态框 -->
    <div id="edit-profile-modal"
        class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 hidden">
        <div class="bg-white rounded-lg p-6 w-full max-w-md">
            <div class="flex justify-between items-center mb-4">
                <h3 class="text-xl font-bold">编辑个人资料</h3>
                <button id="close-edit-modal" class="text-gray-500 hover:text-gray-700">
                    <i class="fas fa-times"></i>
                </button>
            </div>
            <form id="edit-profile-form">
                <div class="mb-4">
                    <label for="edit-username" class="block text-gray-700 font-medium mb-2">用户名</label>
                    <input type="text" id="edit-username"
                        class="w-full px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500"
                        required>
                </div>
                <div class="mb-4">
                    <label for="edit-email" class="block text-gray-700 font-medium mb-2">电子邮箱</label>
                    <input type="email" id="edit-email"
                        class="w-full px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500"
                        required>
                </div>
                <div class="mb-4">
                    <label for="edit-bio" class="block text-gray-700 font-medium mb-2">个人简介</label>
                    <textarea id="edit-bio" rows="4"
                        class="w-full px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500"></textarea>
                </div>
                <div class="mb-4">
                    <label for="edit-avatar" class="block text-gray-700 font-medium mb-2">头像</label>
                    <input type="file" id="edit-avatar"
                        class="w-full px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500"
                        accept="image/*">
                </div>
                <div class="flex justify-end">
                    <button type="button" id="cancel-edit"
                        class="mr-3 bg-gray-300 hover:bg-gray-400 text-gray-800 px-4 py-2 rounded transition duration-300">
                        取消
                    </button>
                    <button type="submit"
                        class="bg-blue-600 hover:bg-blue-700 text-white px-4 py-2 rounded transition duration-300">
                        保存更改
                    </button>
                </div>
            </form>
        </div>
    </div>

    <!-- 功能开发中弹窗 -->
    <div id="development-modal"
        class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 hidden">
        <div class="bg-white rounded-lg p-8 max-w-md w-full">
            <div class="text-center">
                <i class="fas fa-code text-4xl text-blue-500 mb-4"></i>
                <h3 class="text-2xl font-bold mb-2">功能开发中</h3>
                <p class="text-gray-600 mb-6">该功能正在积极开发中，敬请期待！</p>
                <button id="close-dev-modal"
                    class="bg-blue-500 hover:bg-blue-600 text-white px-6 py-2 rounded transition duration-300">
                    了解
                </button>
            </div>
        </div>
    </div>

    <!-- 页脚 -->
    <footer class="bg-gray-800 text-white py-8 mt-12">
        <div class="container mx-auto px-4">
            <div class="grid grid-cols-1 md:grid-cols-4 gap-8">
                <div>
                    <h4 class="text-lg font-bold mb-4">关于我们</h4>
                    <p class="text-gray-400">钓鱼天堂是一个致力于为钓鱼爱好者提供交流平台和专业装备的综合性网站。</p>
                </div>
                <div>
                    <h4 class="text-lg font-bold mb-4">快速链接</h4>
                    <ul class="space-y-2 text-gray-400">
                        <li><a href="index.html" class="hover:text-white transition">首页</a></li>
                        <li><a href="forum.html" class="hover:text-white transition">论坛</a></li>
                        <li><a href="mall.html" class="hover:text-white transition">商城</a></li>
                        <li><a href="auth.html" class="hover:text-white transition">注册/登录</a></li>
                    </ul>
                </div>
                <div>
                    <h4 class="text-lg font-bold mb-4">联系我们</h4>
                    <ul class="space-y-2 text-gray-400">
                        <li><i class="fas fa-envelope mr-2"></i> contact@fishingheaven.com</li>
                        <li><i class="fas fa-phone mr-2"></i> 400-123-4567</li>
                        <li><i class="fas fa-map-marker-alt mr-2"></i> 渔乐路88号钓鱼天堂大厦</li>
                    </ul>
                </div>
                <div>
                    <h4 class="text-lg font-bold mb-4">关注我们</h4>
                    <div class="flex space-x-4">
                        <a href="#" class="text-gray-400 hover:text-white text-xl transition"><i
                                class="fab fa-weixin"></i></a>
                        <a href="#" class="text-gray-400 hover:text-white text-xl transition"><i
                                class="fab fa-weibo"></i></a>
                        <a href="#" class="text-gray-400 hover:text-white text-xl transition"><i
                                class="fab fa-qq"></i></a>
                        <a href="#" class="text-gray-400 hover:text-white text-xl transition"><i
                                class="fab fa-tiktok"></i></a>
                    </div>
                </div>
            </div>
            <div class="border-t border-gray-700 mt-8 pt-6 text-center text-gray-400">
                <p>&copy; 2025 钓鱼天堂 版权所有 | 钓友们的网上家园</p>
            </div>
        </div>
    </footer>

    <!-- 粒子效果 -->
    <script src="https://cdnjs.cloudflare.com/ajax/libs/particles.js/2.0.0/particles.min.js"></script>
    <script src="js/app.js"></script>
    <script src="js/forum.js"></script>
    <script src="js/mall.js"></script>
    <script type="module" src="./js//childJS/infoChild.js"></script>
</body>

</html>